/*var mongoose = require('mongoose'),
    DB_URL = 'mongodb://localhost:27017/mongoosesample',
    User = require('../model/user.js');

mongoose.connect(DB_URL);

mongoose.connection.on('connected', function () {    
    console.log('Mongoose connection open to ' + DB_URL); 
    init();
});    

mongoose.connection.on('error',function (err) {    
    console.log('Mongoose connection error: ' + err);  
});    

mongoose.connection.on('disconnected', function () {    
    console.log('Mongoose connection disconnected');  
});    


function init() {
	var pwd = encoder.bcrypt.hash('111111', 8);
	console.log(pwd)
	var user = undefined;
	user = new User({username: 'bitch', password: pwd, nickname: 'bb', role: 'user', age: 19});
	user.save();
	user = new User({username: 'sam', password: pwd, nickname: 'Sam', role: 'admin', age: 20});
	user.save();
	user = new User({username: 'visitor', password: pwd, nickname: 'Visitor', role: 'admin', age: 21});
	user.save();
}
module.exports = mongoose;*/